<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<h2 class="contentTitle">管理员更新</h2>
<div class="pageContent">
	<form method="post" action="${rootPath }/back/admins_adminsUpdateSubmit.htm"
		class="pageForm required-validate"
		onsubmit="return validateCallback(this)">
		
		<input type="hidden" name="aid" value="${requestScope.admins.id }">
		
		<div class="pageFormContent nowrap" layoutH="97">
			<dl>
				<dt>角色：</dt>
				<dd>
					<select name="roleId">
						<c:forEach items="${requestScope.roleList }" var="role" varStatus="stat">
							<option value="${role.id }" ${role.id == requestScope.admins.role.id ? 'selected' : '' }>${role.name }</option>
						</c:forEach>
					</select>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>邮箱：</dt>
				<dd>
					<input type="text" name="email" class="required email"
						alt="请输入您的电子邮件" value="${requestScope.admins.email }"/>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>真实姓名：</dt>
				<dd>
					<input type="text" name="trueName" class="required" alt="请输入您的真实姓名" value="${requestScope.admins.trueName }"/>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>电话：</dt>
				<dd>
					<input type="text" name="phone" class="required phone" alt="请输入您的电话" value="${requestScope.admins.phone }"/>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>qq：</dt>
				<dd>
					<input type="text" name="qq" class="digits" value="${requestScope.admins.qq}"/>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>状态：</dt>
				<dd>
					<input type="radio" id="adminsUpdateStatus1" name="status" value="1" ${requestScope.admins.status == '1' ? 'checked' : '' }/>
					<label for="adminsUpdateStatus1">启用</label>
					<input type="radio" id="adminsUpdateStatus0" name="status" value="0" ${requestScope.admins.status == '0' ? 'checked' : '' }/>
					<label for="adminsUpdateStatus0">禁用</label>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>创建时间：</dt>
				<dd>
					<fmt:formatDate value="${requestScope.admins.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</dd>
			</dl>
			<dl>
				<dt>更新时间：</dt>
				<dd>
					<fmt:formatDate value="${requestScope.admins.updateTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>上次登陆时间：</dt>
				<dd>
					<fmt:formatDate value="${requestScope.admins.lastLoginTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
					<span class="info"></span>
				</dd>
			</dl>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">提交</button>
						</div>
					</div></li>
				<li><div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div></li>
			</ul>
		</div>
	</form>
</div>
<script type="text/javascript">
	function customvalidXxx(element) {
		if ($(element).val() == "xxx")
			return false;
		return true;
	}
</script>
